<template>
	<image :src="src" :mode="mode" :style="defaultStyle" @click="onClick" @error="onFail"/>
</template>

<script>
	export default {
		name: 'r-image',
		props:{
			src: {
				type: String,
				default: ''
			},
			mode: {
				type: String,
				default: 'aspectFill'
			},
            defaultStyle:{
                type: String,
                default: ''
            },
		},
		methods: {
			onClick() {
				this.$emit('click');
			},
			onFail() {
				this.$emit('error');
			}
		}
	}
</script>

<style>
</style>
